Repository navigation
chore(release): v2.6.0 with two npa stack-overflow fixes - #1935
Conversation
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1935 +/- ##
==========================================
+ Coverage 98.56% 98.59% +0.02%
==========================================
Files 408 409 +1
Lines 127469 127746 +277
Branches 127034 127311 +277
==========================================
+ Hits 125646 125956 +310
+ Misses 1097 1069 -28
+ Partials 726 721 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Code Review: chore(release): v2.6.0 with two npa stack-overflow fixesVerdict: APPROVE Reviewed
FindingsNone. Python's loop preserves target traversal and name deduplication; Elixir's work list preserves terminal field counting. The two regression tests check exact counts at 20,000 levels on 512 KiB stacks. Release pins, all eight lockfiles, role records, documentation, man pages, and SARIF version updates are consistent. Third-party dependency records are unchanged. Review passes executed
The dedicated Files reviewed: 58, including complete structural comparisons for mechanical release artifacts. Unchanged historical changelog prose was checked structurally rather than re-reviewed semantically. Verification
Pre-fix aborts were not independently rerun; the author's evidence was checked against the source paths. No fixes were made. |
| a `SIGABRT`, not a catchable panic, so one request took `bca-web` down | ||
| with every request in flight: a single `POST /v1/metrics` of 24 KB | ||
| (Python) or 40 KB (Elixir), far inside the 4 MiB body cap, killed the | ||
| server. `bca metrics` aborted the same way on such a file. The Elixir |
There was a problem hiding this comment.
Location: CHANGELOG.md:966
MEDIUM -- The Security entry names two affected interfaces; several more are affected
The entry names POST /v1/metrics and bca metrics. The same npa code runs behind other shipped interfaces, and each failed the same way before this fix. Measured on a release build of the base (49dd7178) and on the published wheel:
| Interface | Input | Before the fix |
|---|---|---|
bca check --threshold npa=1 FILE |
Python chain, 7,000 links | exit 134 |
bca check --threshold npa=1 FILE |
Elixir list, 20,000 levels | exit 134 |
bca report -p FILE |
either input | exit 134 |
PyPI big-code-analysis==2.5.1, analyze_source(src, "python") |
Python chain, 20,000 links | interpreter exits 139 |
PyPI big-code-analysis==2.5.1, analyze_source(src, "elixir") |
Elixir list, 100,000 levels | interpreter exits 139 |
Exit 139 is a segmentation fault; the interpreter dies without the overflow message the Rust binaries print. Rust embedders that call analyze or Ast::metrics with npa selected are in the same position. Every row above exits 0 at head, and the bindings return the correct counts.
Not affected, also measured on the base: /v1/ast (500 from the depth bound), /v1/comment and /v1/function (200), bca ops, functions, dump, strip-comments, count, and bca metrics --metrics cyclomatic.
A reader who uses only the Python package, or only bca check, cannot tell from this entry that they need 2.6.0. Suggested change: say that every interface that computes npa was affected, and list them: the Rust API, the Python bindings, bca metrics, bca check with an npa threshold, bca report, and POST /v1/metrics.
There was a problem hiding this comment.
Agreed, fixed in 3643223d. Reproduced on x86_64 Linux (rustc 1.99.1, release build of 49dd7178): bca check --no-config --threshold npa=1 and bca report -p exit 134 on both inputs (Python 7,000 links, Elixir 20,000 levels), and exit 0 at head. The PyPI 2.5.1 wheel's analyze_source exits 139 at 20,000 Python links and 100,000 Elixir levels, and passes at 6,000 and 20,000.
The entry now says every interface that computes npa was affected and lists them: the Rust API (analyze, or Ast::metrics with npa selected), the Python bindings, bca metrics, bca check with an npa threshold, bca report, and POST /v1/metrics. It also says the interpreter dies of a segmentation fault rather than an abort. #1934's body carries the same list.
| ### Security | ||
|
|
||
| - Closed two remotely-triggerable process aborts in `npa` (#1934). | ||
| A Python class-level chained assignment `a = a = … = 1` some 5,000 |
There was a problem hiding this comment.
Location: CHANGELOG.md:959
LOW -- The Python figures do not reproduce at the base revision the PR names
The PR body gives pre as main at 49dd7178 and reports the Python chain aborting at 6,000 links, with a 24,052-byte request killing the server. On a release build of 49dd7178 (aarch64 Linux, rustc 1.99.0, cargo build --release --locked -p big-code-analysis-cli -p big-code-analysis-web):
| Input | Survives | Aborts from |
|---|---|---|
Python chain, POST /v1/metrics |
6,420 links | 6,445 links (25,829-byte body) |
Python chain, bca metrics |
6,000 links (exit 0) | 6,445 links (exit 134) |
Elixir list, POST /v1/metrics |
9,203 levels | 9,228 levels (18,525-byte body) |
An older local build, 2.5.2 at 341f54b, does abort on the Python chain at 5,000 links, so the PR's Python numbers match that build and not 49dd7178. The same figures appear in this entry ("some 5,000 links", "24 KB"), in src/metrics/npa/python.rs:171 ("about 5,000 links") and in the test comment at src/metrics/npa.rs:4784 ("6,000 links aborted a release bca"). For Elixir, "some 20,000 brackets" and "40 KB" are about twice the measured minimum.
The overflow and the fix are not in question: head returns 200 at 100,000 levels for both inputs, and at 1,900,000 levels in a 3.8 MB body. The thresholds depend on the build. Either name the build they were measured on, or give them as approximate ("a few thousand links, under 30 KB"), and correct the pre revision in the PR's evidence table.
There was a problem hiding this comment.
Partly agree; fixed in 3643223d. The pre revision was right: the binary I measured reports git: 49dd71788eb9…. But it was built on x86_64 Linux with rustc 1.99.1, and there the base aborts earlier than on your aarch64 build. Bisected on that build:
| Input | Interface | x86_64 (mine) | aarch64 (yours) |
|---|---|---|---|
| Python chain | bca metrics --metrics npa |
survives 5,564, 134 from 5,582 links | 134 from 6,445 |
| Python chain | POST /v1/metrics |
dies from 5,601 links (22,456 B) | from 6,445 (25,829 B) |
| Elixir lists | bca metrics --metrics npa |
survives 9,854, 134 from 9,873 levels | — |
| Elixir lists | POST /v1/metrics |
dies from 9,892 levels (19,856 B) | from 9,228 (18,525 B) |
So the threshold depends on the build, and as you say, "some 5,000", "20,000 brackets" and "40 KB" were not minimums. The entry now gives the depths approximately ("a few thousand links", "about ten thousand brackets", "under 30 KB"), gives both platforms' thresholds, and says the depth varies with the build and the thread's stack. python.rs and both test comments no longer state a single figure, and the PR body's evidence table names the platform and toolchain.
|
Location: MEDIUM -- The release steps do not include the RustSec advisory that SECURITY.md promises
It matters more than usual here because the exact inputs are already public: #1934 was opened on 2026-11-16 and this PR repeats them, while 2.5.1 is still the newest version on crates.io and PyPI. Without an advisory, Suggested follow-ups, none of which changes this diff:
|
Code Review, round 2 (security focus): chore(release): v2.6.0 with two npa stack-overflow fixesVerdict: APPROVE WITH COMMENTS Reviewed
Findings
What was verifiedRelease builds of both revisions ( The vulnerability and the fix, over
On the base the server log ends with The regression tests can fail. With head's The version claims hold. No other abort was found through the server. A generator produced 978 deeply nested or chained inputs across 23 language variants (brackets, calls, operator and member chains, assignments, patterns, types, and nested functions, classes and modules). Each went to all four POST routes of the head server:
13 of the 14,536 requests hit the client timeout before finishing, so for those the result is only "no abort within 60 or 180 seconds". Deep function nesting returns a clean 500 from the serialization depth bound. The harness was checked against the base first, where it reports the two known aborts. Static pass. A script that lists self-calling functions, call cycles and self-nesting types flags both fixed functions on the base and neither at head. The candidates on the server's request path were read: the self-nesting result types have iterative drops and depth-bounded serializers, and the other hits there are bounded by the grammar or are name collisions. Memory at the cap. The new Elixir work list does not raise peak memory: 799 MiB for the 1,900,000-level Dependencies. Third-party lockfile entries are unchanged from the base (round 1), and the Pre-existing issues outside this diffThe search also turned up three issues that predate this PR and are not caused by it. None of them makes
Review passes executed
The dedicated Files reviewed: 58 in the diff (round 1), plus the request path and result-tree code outside it for this round. No fixes were made. |
|
Location: MEDIUM -- CSV output still aborts on deeply nested functions (pre-existing, not caused by this PR)
Measured on release builds (aarch64 Linux, rustc 1.99.0). The input is JavaScript:
With In a sweep of 978 generated inputs through 12 CLI commands and formats (11,736 runs at head), 76 runs aborted, all of them Reach: the CLI, and embedders through the public This does not block the PR. It is worth deciding before the tag, though: the new changelog entry says |
|
Location: LOW --
Reproduction: the C source
All of these ran on the interpreter's main thread. The 2.5.1 wheel shows this predates the PR. I rate it LOW because the caller has to walk upward from a zero-width node. Code that reports parse errors by looking at the parent of each The server and the CLI did not reach it. 6,264 requests on error-recovery variants of the generated inputs (no closers, half the closers, an empty innermost level) left the head server alive, and that includes this C input at 100,000 levels on all four POST routes. 2,328 CLI runs on the empty-innermost variant, 108 of them C or C++, aborted only in the CSV writer. Possible directions: report the recursion to tree-sitter, and in the bindings answer |
|
Location: MEDIUM -- Two small inputs keep a server thread busy for minutes (pre-existing, no abort) Neither input kills the server, and neither is caused by this PR. They matter because a parse that passes the deadline is not cancelled. It is orphaned and keeps running ( Times are from the head release server started with 1. Perl:
2. Tcl and iRules:
Each doubling costs about four times as much. Possible directions: cancel the parse when the deadline passes instead of orphaning it, report the Perl case to the grammar, and add a scaling probe for the Tcl |
A Python class-level chained assignment a few thousand links long, or an Elixir defstruct list nested about ten thousand brackets deep, overflowed the thread stack and aborted the process: the Python reader recursed once per link, the Elixir field count once per bracket. An abort is not a catchable panic, so every interface that computes npa died with it, and one POST /v1/metrics under 30 KB killed bca-web. The depth varies with the build: release builds of the base aborted from about 5,600 links and 9,900 levels on x86_64 Linux. The Python reader now iterates the chain's links and the Elixir count opens its wrappers from an explicit stack. Each gets a test on a 512 KiB stack at 20,000 levels; with the recursion restored they abort at about 2,220 and 940 levels. Fixes #1934
24fd7f9 to
e38295c
Compare
|
Re the For 2.6.0 I'll draft both advisories after publish: affected The three pre-existing findings posted later are filed: #1936 (CSV writer recursion; fixed in this PR by |
e38295c to
f19ce48
Compare
|
Second round pushed (
Tracked here rather than upstream, per the maintainer: #1940 (the Perl grammar's quadratic |
write_space_rows called itself once per nested FuncSpace, so a file nesting a few tens of thousands of closures aborted bca metrics -O csv and the public write_csv / write_csv_aggregate: from about 43,000 levels on an x86_64 release build. The rows now come from an explicit stack, children pushed in reverse so the depth-first order is kept (nested_spaces_flatten_depth_first pins it). A new test writes a 50,000-level space on a 512 KiB stack; with the recursion restored it aborts at about 5,150 levels. Fixes #1936
f19ce48 to
3aa3a9f
Compare
|
Pushed |
| crates.io and PyPI both carry the release: an advisory tells its | ||
| readers which version to install, so that version must resolve. | ||
|
|
||
| 1. **Draft a GitHub advisory.** Under **Security → Advisories → New |
There was a problem hiding this comment.
Location: RELEASING.md:227
MEDIUM — Select affected packages per vulnerability; the web package is missing
The new procedure applies to every own-code Security entry, but always names the big-code-analysis crate and both PyPI packages, and always files under crates/big-code-analysis/.
That list fits the NPA fixes, but this release also fixes the web-only timeout/orphan issue (#1939). The vulnerable orchestration is in big-code-analysis-web/src/web/server.rs:103-199; the published package is big-code-analysis-web (big-code-analysis-web/Cargo.toml:2). Neither Python wheel ships that server. Following this procedure for #1939 would omit the affected package and identify unaffected Python packages instead.
Choose the affected package names, ecosystems, version ranges, and RustSec directory for each vulnerability. Keep the current three-package list as an NPA example, and include big-code-analysis-web for the web-only fix.
There was a problem hiding this comment.
Agreed, fixed in 377cbea5. The step now chooses packages per vulnerability. A library defect names the big-code-analysis crate and both PyPI packages; a bca-web-only one names the big-code-analysis-web crate alone. RustSec gets one file per affected crate under crates/<crate>/. The advisory text also names the release archives, which carry bca and bca-web and which no ecosystem covers. For 2.6.0 that means two advisories after publish: one for #1934 (the crate and both PyPI packages), one for #1939 (big-code-analysis-web).
| request body early; partial requests on a keep-alive connection could | ||
| bypass the request header timeout) by moving `actix-http` 3.21.0 → | ||
| 3.22.0. All three reach `bca-web` only. No other package version or | ||
| checksum moved; five entries (`errno`, `rustix`, `rustls`, |
There was a problem hiding this comment.
Location: CHANGELOG.md:1034
LOW — The changed dependency record is rustls-platform-verifier, not rustls
The windows-sys edge moved in rustls-platform-verifier 0.7.1 (Cargo.lock:3785-3803). The rustls record is unchanged. Comparing all 510 package records confirms the five edge-only changes are errno, rustix, rustls-platform-verifier, tempfile, and winapi-util; actix-http is the only package version/checksum change.
Replace rustls with rustls-platform-verifier in this list and the matching commit description if it is revised.
There was a problem hiding this comment.
Right, fixed in 08267c18. The lockfile diff confirms the five re-pointed entries are errno, rustix, rustls-platform-verifier, tempfile and winapi-util. The commit message doesn't name them, so it is unchanged.
|
Location: LOW — Remaining #1937 caller: The five changed parent/sibling getters now work on the original reproducer. Independently reproduced with freshly built bindings at import big_code_analysis as bca
n = 20_000
source = "void f(){x = " + "(" * n + ")" * n + ";}\n"
ast = bca.Ast.parse(source, "c")
missing = next(node for node in ast.root_node.walk() if node.is_missing)
print(missing.field_name)At depth 3 this prints This is a pre-existing residual, not a regression in the new walk. It is also separate from #1941: this Python getter can access the owning root just like the five fixed getters. Reuse the safe lookup here and add |
| children: Vec::with_capacity(node.child_count()), | ||
| children: Vec::with_capacity(width), | ||
| next_child: 0, | ||
| fields: width < FIELD_PROBE_WIDTH || has_field_child(&node), |
There was a problem hiding this comment.
Location: big-code-analysis-ast/src/ast.rs:320
MEDIUM — Preserve inherited fields under wide ERROR nodes
has_field_child() is not equivalent to asking whether the cursor can report a child's field. An ERROR node has no production field map of its own, so child_by_field_id() finds nothing. Its hidden children can still carry fields, which the previous cursor/indexed lookups exposed. Once the error node has at least 32 children, this new gate suppresses all of those fields.
Reproduced at 3aa3a9f7 with freshly built Python bindings:
import big_code_analysis as bca
ast = bca.Ast.parse("struct T(" + "i32, " * 20, "rust")
error = next(node for node in ast.root_node.walk() if node.is_error)
print(error.child_count) # 43
print(sum(error.field_name_for_child(i) == "type"
for i in range(error.child_count))) # 19
pending = [ast.dump()]
while pending:
node = pending.pop()
pending.extend(node["children"])
if node["type"] == "ERROR":
print(sum(child["field_name"] == "type"
for child in node["children"])) # 0; should preserve 19With 10 elements (23 children), the same unfinished construct retains all nine annotations. The new optimization therefore changes exported structure depending on width, affecting Ast::dump, Python Ast.dump, and /v1/ast on incomplete source. Both builders share this gate, so their parity test cannot catch it; the new valid tuple-struct fixture does not cover recovery nodes.
Keep per-child field reads for ERROR nodes, or use a predicate that also accounts for fields on their hidden children. Add a regression comparing the recovery-tree export with independently obtained raw field annotations on both sides of the threshold.
There was a problem hiding this comment.
Agreed, fixed in a678fcb2. has_field_child now answers true for an ERROR node, so its children's fields are read one by one again. Your reproducer is now the regression test a_wide_error_node_keeps_its_childrens_fields. It parses an unfinished struct T( at 10 and 20 elements, which gives 23 and 43 children, one on each side of the probe width. It checks the raw field_name_for_child count (9 and 19; recovery leaves the first element without a field) and that both builders export exactly that many. Without the exception, the 43-child cursor export finds 0.
To check that nothing else is lost, I compared the export with the probe against the export without it, over every file in a supported language in the repository and its submodules. That is 15,405 files, each exported as written, truncated at its midpoint, and with a tenth cut out at the one-third mark: 46,215 exports through both builders. With the exception, none differ. As a positive control, without it 3,308 differ (C/C++, JS, Java, Python, C#, shell, Rust, Objective-C), 21 of them unmodified files.
The exception has a cost. An ERROR node over deeply nested hidden rules is quadratic again, as every node was in 2.5.1. expr {((…1…)) with its closing brace missing exports in 226 / 745 / 2,967 ms at 8,000 / 16,000 / 32,000 parentheses (debug-built extension), and the raw node carries no fields at all. That is tracked as #1942. Because it reopened the #1939 orphan through the export, 5606dcef also has the export check the cancel flag; see the round summary.
Code Review, round 3: fixes from the previous reviewVerdict: REQUEST CHANGES Reviewed the 20-file delta from
Findings
Previous findings
VerificationHost: aarch64 Linux, rustc 1.99.0. Fresh isolated worktree;
Review coverage and limitsPasses: correctness/API behavior, cancellation security and race/accounting review, AST/Python navigation performance, regression-test strength, and release/dependency consistency. Four independent read-only reviewers covered cancellation, Python navigation, AST export, and release documentation/dependencies. The dedicated security agent again failed before analysis with its Daybreak Red access requirement; the cancellation partition received a fallback review. LSP was unavailable, so call sites were traced through source searches. The previous broad input sweep and pre-fix mutation experiments were not repeated. No fuzz files changed, so |
Node.parent, the sibling getters and Node.field_name called tree-sitter's lookups, and in the pinned runtime ts_node_parent asks ts_node_child_with_descendant, which calls itself once per tree level when the node it looks for is zero-width. A MISSING node is zero-width, so asking for the parent, a sibling or the field name of one some 15,000 levels deep killed the interpreter. For a zero-width node the bindings now walk down from the root with a cursor, entering only the nodes whose span holds its position, read its siblings off the parent found, and read its field from that parent's cursor; a node with width keeps tree-sitter's iterative lookup. A Rust test holds the walk to tree-sitter's answers for every zero-width node of a shallow tree, and runs it 20,000 levels deep on a 512 KiB stack, where tree-sitter's own parent() aborts. A Python test checks both depths through the getters and field_name. The Rust Node::parent cannot reach the root this way and still makes the call; its doc says so, and #1941 tracks it. The PyNode baseline entries record the getters' smaller method count. Fixes #1937
RUSTSEC-2026-0552, -0553 and -0554 against actix-http 3.21.0 (bare LF in chunked trailers, malformed quoted chunk extensions, and partial requests bypassing the header timeout on keep-alive) turned cargo-deny red on this release. cargo update -p actix-http moves it to 3.22.0, which carries all three fixes; no other package version or checksum moves, and five entries re-point an edge between windows-sys and getrandom versions the lockfile already carried.
SECURITY.md promises a RustSec advisory once a fix ships, but RELEASING.md had no step for it and none was ever filed. Add a post-publish step for a security release: per vulnerability, a GitHub advisory naming the packages that ship the vulnerable code (the library crate and both PyPI packages for a library defect, the big-code-analysis-web crate alone for a server one), then a RustSec advisory per affected crate aliasing it.
The --parse-timeout-secs doc comment ended "(issue #707)", which clap renders into bca-web --help and cargo xtask into man/bca-web.1. Issue references belong in // comments, as bca's own help test holds for that binary. A cli_smoke test now fails on any #NN to #NNNN in bca-web --help; it failed on #707 before the move.
The manifest said actix negotiates HTTP/2 only through TLS ALPN, so the http2 feature bought nothing on bca-web's plaintext socket. actix-web 4.19 would also accept prior-knowledge h2c there. The note now says so; dropping the feature still stands, for the h2 0.3 advisory.
3faf705 to
48f09a9
Compare
Summary
The eight commits that make up the v2.6.0 tag:
fix(npa): unroll the Python and Elixir recursionsfixes the twonpastack overflows reported in fix(npa): deep Python assignment chains and Elixir defstruct lists abort the process #1934. They are process aborts thatone small
bca-webrequest can trigger, and every interface thatcomputes
npawas exposed. It adds a CHANGELOG### Securityentry.fix(output): write CSV rows from an explicit stackfixes fix(output): the CSV writer recurses once per nested space and aborts on deep nesting #1936,which the PR review found: the same recursion-per-level abort in the
CSV writer (
bca metrics -O csv,write_csv,write_csv_aggregate).bca-webnever emits CSV, so it goes under### Fixed.perf(ast): skip field reads where no field existsfixes perf(web): /v1/ast export of a nested Tcl expr grows quadratically #1938: theAST export was quadratic in a Tcl
expr's nested parentheses,because a cursor's field read climbs every hidden grammar level. A
frame 32 or more children wide now asks the production field map
first. New scaling probe
dump/tcl-expr-parens.fix(web): stop a timed-out request's parsefixes fix(web): a parse past its deadline keeps running, so slow inputs exhaust the server into 503s #1939: a parsepast its deadline is cancelled through tree-sitter's progress
callback instead of running on as an orphan, so slow inputs (Perl
-and =>chains, perf(perl): tree-sitter-perl 1.1.2 parses-and =>chains in quadratic time #1940) no longer drive the server into 503s. Asecond
### Securityentry.fix(python): walk to a zero-width node's parentfixes fix(python): Node.parent and the sibling getters segfault on a deep zero-width node #1937: thebindings'
Node.parentand sibling getters no longer recurse throughtree-sitter on a zero-width (
MISSING) node. The RustNode::parentcannot be fixed the same way and is tracked in fix(ast): Node::parent on a deep zero-width node overflows the stack in tree-sitter #1941.
fix(deps): bump actix-http for three advisoriesclearsRUSTSEC-2026-0552, -0553 and -0554, published against
actix-http3.21.0 while this PR was open (they turned
cargo-denyred on theprevious push).
actix-http3.21.0 → 3.22.0; no other packageversion moves. A third
### Securityentry.docs(release): add the security-advisory stepadds thepost-publish step that
SECURITY.mdpromises andRELEASING.mdlacked: a GitHub advisory covering the crate and both PyPI packages,
then a RustSec advisory aliasing it.
chore(release): prepare v2.6.0bumps the workspace and everylockstep pin from 2.5.2 to 2.6.0. It covers the five excluded
grammar leaves and
enums, the eight lockfiles, the role-coveragepin migration and observation, the regenerated man pages, the SARIF
tool-version snapshots, and the reader-facing doc pins.
## [Unreleased]moves into## [2.6.0] - 2026-11-16; the deferred3.0 MI note stays under
[Unreleased], as at 2.5.0. It touches thesame 55 files as the v2.5.0 prep commit. The
recipes/ci.mdpinsmove in the post-publish follow-up, as RELEASING.md prescribes.
Fixes #1934
Fixes #1936
Fixes #1937
Fixes #1938
Fixes #1939
Evidence
My measurements are on x86_64 Linux, rustc 1.99.1, release builds
(
cargo build --release -p big-code-analysis-cli -p big-code-analysis-web).baseismainat49dd7178(the binary reportsgit: 49dd71788eb9…);headise38295c7(git: e38295c7b09d…,clean), the first review round's tip. The final tip leaves the
npaandCSV code these tables exercise unchanged.
The depth that aborts on the base depends on the build. The aarch64
column is the PR review's figures (rustc 1.99.0):
a = a = … = 1bca metrics --metrics npaa = a = … = 1POST /v1/metricsdefstruct [[…:a…]]bca metrics --metrics npadefstruct [[…:a…]]POST /v1/metricsEvery interface that computes
npaaborts the same way on the base andpasses at head:
bca check --no-config --threshold npa=1bca report -pbca metrics(every metric)POST /v1/metrics200, server upbig-code-analysis==2.5.1,analyze_sourcebig-code-analysis==2.5.1,analyze_sourceThe Python bindings run the analysis on the calling thread (
py.detachreleases the GIL but stays on it), so they need a deeper input than the
CLI's worker threads before they fault.
The CSV writer (#1936), JavaScript
x = ()=>()=>…1;:bca metrics -O csv FILEbca metrics -O csv --output-dir DIR FILEbca metrics -O csv -o OUT FILEmain)With the recursion restored, the regression tests abort on their
512 KiB stacks at about 2,220 links (Python), 940 levels (Elixir) and
5,150 levels (CSV) in the test profile. The tests' depths (20,000,
20,000 and 50,000) sit 9x, 21x and 10x past the overflow depth.
Codecov's one patch miss on the first push (
python.rs:175, theunreachable
else { return; }of a childlessAssignment, re-indentedinto the patch) is gone. The reader now iterates the chain with
successorsandfilter_map, and an llvm-cov run of the Pythonnpatests hits every line of the function.
#1938: Tcl
exprexportmake bench-scaling,dump/tcl-expr-parenson the 4,000 / 8,000 /16,000 ladder (bound 1.50):
On the 500-2,000 ladder the climbing export still fitted 0.82, which is
why the probe takes the taller one.
a_wide_node_with_fields_keeps_them(an 81-child Rust tuple-struct body) fails when wide nodes skip their
fields unconditionally.
#1939: cancelled parse
test_run_parse_timeout_stops_the_orphaned_parse: 4,000 Perl-and =>pairs under a 200 ms deadline. The orphan ends about 26 msafter the deadline; with
cancel.cancel()removed it is still runningat the test's 10 s bound.
a_cancelled_parse_yields_an_empty_tree_and_a_clean_parserfailswithout the reset (
0..96: the empty parse resumed the stopped one)and without the cancellation (
0..4400).Release servers,
BCA_MAX_ORPHANED_TASKS=1,--parse-timeout-secs 2,one
POST /v1/metricsof 8,000 pairs, then a small request at +0.5,+1, +3 and +10 s:
e38295c7#1937: zero-width parent in the bindings
the_root_walk_agrees_with_tree_sitter_where_it_is_safe: for everyzero-width node of a 6-deep tree, the root walk's parent and siblings
equal tree-sitter's.
a_deep_zero_width_node_finds_its_parent_on_a_small_stack: 20,000levels on a 512 KiB stack. Swapping the walk for
tree_sitter::Node::parentaborts it (has overflowed its stack).test_parent_and_siblings_of_a_deep_zero_width_node[3, 20000]throughthe Python getters. On the PyPI 2.5.1 wheel,
parentandnext_siblingexit 139 at 20,000 levels.Gates (local)
At
3aa3a9f7(the tip):make pre-commit:BCA_GATE: pass (gate=pre-commit), 7,417 Rust tests and 413 Python testsmake release-check VERSION=2.6.0: passed (cargo-deny clean on all eight lockfiles, both license renders, the five leafcargo publish --dry-runs, publish metadata, the[2.6.0]changelog section)At
d1ac55a7, whose code is the tip's apart from two tests and theactix-httplockfile entry:make bench-scaling: all 140 probes within their complexity bound (dump/tcl-expr-parens0.52)make fuzz-checkpassed at the first push's prep commit; no fuzz input or fuzz lockfile has moved since.Codecov
The previous push read 98.26% (2 misses, 2 partials) against the project's 98.57%. Two of the misses and one partial were a spin loop in a cancel test whose body only ran when the cancel lost a race; the test now orders the threads over a channel. The other partial was the
?on a row write in the CSV walk, pre-existing and re-indented into the patch:a_failing_sink_stops_the_row_walknow fails a sink mid-walk, and with the error swallowed it reads 1,979 write attempts against a full render's 65.The
[2.6.0]section is dated 2026-11-16; it gets the tag's date in a one-line amend of the prep commit when this lands.